package com.design.decorator;

/**
 * 装饰器模式
 * 可以简单理解为俄罗斯套娃，比如说java中流的构建
 * @author ytj
 * @date 2024/11/27 17:06
 */
public class DecoratorTest {
    public static void main(String[] args) {
        LoginSsoDecorator loginSsoDecorator=new LoginSsoDecorator(new OssInterceptor());
        boolean preHandle = loginSsoDecorator.preHandle("1successhuahua", "test", "test");
        System.out.println("登录校验结果:"+(preHandle?"放行":"拦截"));
    }
}
